<!DOCTYPE html>
<html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta charset="utf-8" />
		<title th:text="${appTitle}">Open Software Version Management</title>
		<link rel="icon" href="../../static/favicon.ico" th:href="@{/img/favicon.png}" type="image/x-icon" />
		<link rel="shortcut icon" href="../../static/favicon.ico" th:href="@{/img/favicon.png}" type="image/x-icon" />
		<!-- zui -->
		<link href="../../static/css/zui.min.css" rel="stylesheet" th:href="@{/css/zui.min.css}">
		<link href="../../static/css/zui-theme.min.css" rel="stylesheet" th:href="@{/css/zui-theme.min.css}">
		<link href="../../static/lib/chosen/chosen.min.css" rel="stylesheet" th:href="@{/lib/chosen/chosen.min.css}">
		<link href="../../static/css/style.css" rel="stylesheet" th:href="@{/css/style.css}">
		<!--[if lt IE 9]>
		   <script src="../../static/lib/ieonly/html5shiv.js" th:src="@{/lib/ieonly/html5shiv.js}"></script>
		   <script src="../../static/lib/ieonly/respond.js" th:src="@{/lib/ieonly/respond.js}"></script>
		   <script src="../../static/lib/ieonly/excanvas.js" th:src="@{/lib/ieonly/excanvas.js}"></script>
		<![endif]-->
	</head>

	<body>
		<header th:replace="fragments :: header"></header>

		<div id="page">
			<div id="pageHeader">
				<div class="wrapper container" th:class="${#bools.isTrue(isFluid) ?'container-fluid':'container'}">
					<i class="icon icon-file-powerpoint"></i>
					<h2>项目 <small><i class="icon icon-pencil"></i></small></h2>
				</div>
			</div>
			<div id="pageBody">
				<div class="container" th:class="${#bools.isTrue(isFluid) ?'container-fluid':'container'}">
					<div id="pageContent" th:object="${prjInfo}">
						<form method="POST" enctype="multipart/form-data" th:action="@{/project/save}" action="/project/save">
							<div class="form-group ">
								<input type="hidden" class="form-control" id="id" name="id" maxlength="25" required th:value="*{id}">
								<label for="prjName" class="required">项目缩写</label>
								<input type="text" class="form-control" id="shortName" name="shortName" maxlength="25" required th:value="*{shortName}"
								 readonly>
							</div>
							<div class="form-group ">
								<label for="fullName">项目全称</label>
								<input type="text" class="form-control" id="fullName" name="fullName" maxlength="50" th:value="*{fullName}">
							</div>
							<div class="form-group ">
								<label for="metaPrjId" class="required">CN Project</label>
								<select class="form-control" name="metaPrjId" id="metaPrjId" required s>
									<option th:each="prj : ${metaProjects} " th:value="${prj.prjId}" th:text="${prj.prjName}" th:selected="${prjInfo.metaPrjId == prj.prjId}">T4</option>
								</select>
							</div>
							<div class="form-group ">
								<label for="metaIds" class="required">关联模块</label>
								<select name="metaIds" id="metaIds" required multiple="" data-placeholder="选择强制关联模块..." class="chosen-select form-control"
								 tabindex="2">
									<option th:each="meta : ${metaInfos}" th:value="${meta.id}" th:text="${meta.name}" th:selected="${#lists.contains(hasMetaInfos,meta)}">APP</option>
								</select>
							</div>
							<div class="form-group ">
								<label for="decription">描述</label>
								<textarea id="decription" maxlength="250" class="form-control" name="decription" placeholder="项目描述" th:value="*{decription}"></textarea>
							</div>
							<button type="submit" class="btn btn-primary"><i class="icon icon-save"></i> 提交</button>
							<a href="javascript:void(0);" class="btn btn-danger" data-toggle="modal" data-target="#delConfirm"><i class="icon icon-trash"></i>
								删除</a>
							<a th:href="@{/project}" class="btn"><i class="icon icon-reply"></i> 返回</a>
							<input type="hidden" name="model" value="C" />
							<div class="modal fade" id="delConfirm">
								<div class="modal-dialog modal-sm">
									<div class="modal-content">
										<div class="modal-header">
											<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
											<h4 class="modal-title"><i class="icon icon-question-sign "></i> 确认</h4>
										</div>
										<div class="modal-body">
											<p>您确定要删除 <strong><span class="label label-badge" th:text="*{shortName}"></span></strong> 项目吗?</p>
										</div>
										<div class="modal-footer">
											<a th:href="@{/project/del/{id}(id=${prjInfo.id})}" class="btn btn-danger">确定</a>
											<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
										</div>
									</div>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>

			<footer th:replace="fragments :: footer"></footer>

			<!-- jQuery (ZUI中的Javascript组件依赖于jQuery) -->
			<script src="../../static/lib/jquery/jquery.js" th:src="@{/lib/jquery/jquery.js}"></script>
			<!-- ZUI Javascript组件 -->
			<script src="../../static/js/zui.min.js" th:src="@{/js/zui.min.js}"></script>
			<script src="../../static/lib/chosen/chosen.min.js" th:src="@{/lib/chosen/chosen.min.js}"></script>
			<script type="text/javascript" src="../../static/js/base.js" th:src="@{/js/base.js}"></script>
			<script type="text/javascript" src="../../static/js/project_e.js" th:src="@{/js/project_e.js}"></script>
	</body>

</html>
